The disclosure relates to additive manufacturing techniques, also known as three-dimensional (3d) printing. 3d printing is rapidly evolving as a versatile manufacturing technique that allows to replace or complement manufacturing techniques such as molding, cutting, or grinding. Candidates for 3d printing include functional and aesthetic components of machinery, consumer products, and industrial products that are produced in short runs and, in particular, highly customized and high value products. These products usually need to be fabricated with carefully-controlled dimensions, smooth surfaces, and good detail. Misalignments of the 3d printing device may lead to geometrical distortions and deviations. The present disclosure is concerned with techniques for detecting and correcting misalignments of a 3d printing device so to enhance the quality of the 3d printing.